layui.define(['table', 'form'], function(exports){
  var $ = layui.$,form = layui.form;
 
  $('#userId').select2({
      placeholder: "请选择账号归属代理",
      width: '250px',
      theme: 'bootstrap',
      allowClear : true,
      ajax: {
          url: layui.setter.webRoot + '/agent/select.data',
          method: 'post',
          delay: 250,
          processResults: function (result) {
              if (result.code == 200) {
                  return {
                      pagination: {more: result.body.more},
                      results: result.body.data || []
                  };
              } else {
                  return {results: []};
              }
          }
      }
  });
  exports('account_group_edit', {})
});